<?php
$products = $this->products;
?>

<div class="content-title">
    <h1>Sản phẩm mới</h1>
</div>
<div class="content-right">
    <?php if($products): ?>
    <?php foreach($products as $product): ?>
    <div class="product-item">
        <a href="/chi-tiet/<?php echo $this->routeUrl($product['name']) . '-' . $product['id'] .'.html'?>"><img class="product-img" src="<?= $product['thumbnail_link'] ?>"/></a>
        <h4 class="product-code">Mã SP: <?= $product['code'] ?></h4>
        <span class="product-price">Giá: <?= $this->currencyFormat($product['price_sale'], null) ?> VNĐ</span>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>
</div>

<div class="content-left">
    <?php $support = $this->support; ?>
    <?php if($support): ?>
    <!-- customer suport  -->
    <div class="customer-support">
    	<h4 class="suppoter-title">Hỗ trợ trực tuyến</h4>
        <?php foreach ($support as $s): ?>
            <?php if($s['type'] == Model_DbTable_Support::TYPE_YAHOO): ?>
                <div class="support-item" style="margin-top:15px;">
                    <a href="ymsgr:sendIM?<?= $s['account'] ?>">
            		    <img title="" alt="" src="http://opi.yahoo.com/online?u=<?= $s['account'] ?>&amp;m=g&amp;t=2" border="0">
            		</a>
            		<span class="support-name"><?= $s['supporter_name'] ?></span>
            		<?php if($s['phone']): ?>
            		<span class="support-phone"><?= $s['phone'] ?></span>
            		<?php endif; ?>
        		</div>
    		<?php elseif($s['type'] == Model_DbTable_Support::TYPE_SKYPE): ?>
                <div class="support-item">
            		<a href="callto:<?= $s['account'] ?>">
            			<img title="" src="http://tnktravel.vn/images/skype_logo.gif" alt="" border="0" width="105" height="47">
            		</a>
            		<span class="support-name"><?= $s['supporter_name'] ?></span>
            		<?php if($s['phone']): ?>
            		<span class="support-phone"><?= $s['phone'] ?></span>
            		<?php endif; ?>
        		</div>
    		<?php endif; ?>
		<?php endforeach; ?>
    </div>
    <?php endif; ?>
</div>

